﻿using System;
using System.Collections.Generic;
using System.Text;
using KKCai.App.DAL;
using KKCai.App.Model;

namespace KKCai.App.BLL
{
    public class NewsTypeManager
    {
        private NewsTypeDao _dao = new NewsTypeDao();

        public NewsTypeInfo Save(NewsTypeInfo info)
        {
            return _dao.Save(info);
        }

        public NewsTypeInfo Update(NewsTypeInfo info)
        {
            _dao.Update(info);

            _dao.CommitChanges();

            return info;
        }

        public NewsTypeInfo Get(int id)
        {
            return _dao.Get(id);
        }

        public void Delete(NewsTypeInfo info)
        {
            _dao.Delete(info);

            _dao.CommitChanges();
        }
    }
}
